package com.zyk.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import lombok.Data;
import lombok.Synchronized;

import java.io.Serializable;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author feifeimao
 * @since 2017-11-20
 */@Data
public class User extends Model<User>  {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 登陆名
     */
	@TableField("login_name")
	private String loginName;
    /**
     * 用户名
     */
	private String name;
    /**
     * 密码
     */
	private String password;
    /**
     * 密码加密盐
     */
	private String salt;
    /**
     * 性别
     */
	private Integer sex;
    /**
     * 年龄
     */
	private Integer age;
    /**
     * 手机号
     */
	private String phone;
    /**
     * 用户类别
     */
	@TableField("user_type")
	private Integer userType;
    /**
     * 用户状态
     */
	private Integer status;
    /**
     * 所属机构
     */
	@TableField("organization_id")
	private Integer organizationId;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;

	public User(String name) {
		this.name = name;
	}

	protected Serializable pkVal() {
		return null;
	}

	public User() {
	}

	public User(Long id, String loginName, String name, String password, String salt, Integer sex, Integer age, String phone, Integer userType, Integer status, Integer organizationId, Date createTime) {
		this.id = id;
		this.loginName = loginName;
		this.name = name;
		this.password = password;
		this.salt = salt;
		this.sex = sex;
		this.age = age;
		this.phone = phone;
		this.userType = userType;
		this.status = status;
		this.organizationId = organizationId;
		this.createTime = createTime;
	}
}
